﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MvcTest.Models.Board>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Index</h2>
    <table>
        <tr>
            <th>
                번호
            </th>
            <th>
                제목
            </th>
            <th>
                글쓴이
            </th>
            <th>
                날짜
            </th>
            <th>
                조회
            </th>
        </tr>
        <% foreach (var item in Model)
           { %>
        <tr>
            <td>
                <%= Html.Encode(item.wr_id)%>
            </td>
            <td>
                <a href="/Board/Read/<%=Html.Encode(item.wr_id) %>">
                    <%= Html.Encode(item.wr_subject)%></a>
            </td>
            <td>
                <%= Html.Encode(item.wr_name)%>
            </td>
            <td>
                <%= Html.Encode(item.wr_rDate)%>
            </td>
            <td>
                <%= Html.Encode(item.wr_hit)%>
            </td>
        </tr>
        <% } %>
    </table>
    <p>
        <input type="button" id="write_btn" value="글쓰기" onclick="location.href='/Board/Write/';" />
    </p>
</asp:Content>
